/*  p(i) = i^3
 *
 *  i^{3} = i (i - 1) (i - 2) = i^3 - 3 i^2 + 2 i
 *  i^{2} = i (i - 1) = i^2 - i
 *  i^{1} = i
 *  i^{3} + 3 i^{2} = i^3 - i = p(i) - i
 *
 *  p(i) = i^{3} + 3 i^{2} + i = i^{3} + 3 i^{2} + i^{1}
 *  
 *  P(i) = 1/4 i^{4} + i^{3} + 1/2 i^{2}
 *  P(n+1) = 1/4 (n+1) (n) (n-1) (n-2) + (n+1) (n) (n-1) + 1/2 (n+1) (n)
 *         = (n+1) (n) [1/4 (n-1) (n-2) + (n-1) + 1/2]
 *         = (n^2 + n) [1/4 n^2 + (1/2 - 3/4) n + (2/4 - 1/2)]
 *         = (n^2 + n) (1/4 n^2 - 1/4 n)
 *         = 1/4 n^2 (n + 1) (n - 1)
 *  P(1) = 1/4 (1) (0) (-1) (-2) + (1) (0) (-1) + 1/2 (1) (0)
 *       = 0
 */


 #include <cstdio>

#define MAX_X 50001

typedef unsigned long long int uint;


 uint cube_sum[MAX_X] = {0,1};


 uint sequence (uint n)
 {
 	uint &cs = cube_sum[n];

 	if (cs)
 		return cs;

 	cs = sequence (n - 1) + n * n * n;

 	return cs;
 }


 int main ()
 {
 	uint n;

 	while (scanf ("%llu", &n) == 1)
 	{
 		printf("%llu\n", sequence (n));
 	}

 	return 0;
 }